package com.fgr.mapper;

import com.fgr.beans.Help;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;

import java.util.List;

public interface HelpMapper {
        //增加help
        public Integer addHelpMap(Help help);

        public List<Help> findAllHelpStrayBg();

        @Delete("delete from an_help where h_id=#{hId}")
        public Integer deleteHelpByhIdBg(Integer hId);

        @Select("select * from an_help where h_id=#{hId}")
        public Help findHelpByHid(Integer hId);

        @Insert("insert into an_help(h_uid,h_time,h_location,h_formation) values(#{hUid},#{hTime},#{hLocation},#{hFormation})")
        public Integer addHelpBg(Help help);

        @Update("update an_help set h_uid=#{hUid},h_time=#{hTime},h_location=#{hLocation},h_formation=#{hFormation} where h_id=#{hId}")
        public Integer updateHelpBg(Help help);


        }